﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WQDSkin.Forms.Controls
{
    public class WQDTabControl : TabControl
    {

        public WQDTabControl()
        {
            
        }

        public bool isMultiRow
        {
            get { return (bool)GetValue(isMultiRowProperty); }
            set { SetValue(isMultiRowProperty, value); }
        }

        public static readonly DependencyProperty isMultiRowProperty =
            DependencyProperty.Register("isMultiRow", typeof(bool), typeof(WQDTabControl), new PropertyMetadata(false));


        /// <summary>
        /// 是否换行
        /// </summary>
        public bool IsWrap
        {
            get { return (bool)GetValue(IsWrapProperty); }
            set { SetValue(IsWrapProperty, value); }
        }
         
        public static readonly DependencyProperty IsWrapProperty =
            DependencyProperty.Register("IsWrap", typeof(bool), typeof(WQDTabControl), new PropertyMetadata(false));
         
        public SolidColorBrush ArrowForeground
        {
            get { return (SolidColorBrush)GetValue(ArrowForegroundProperty); }
            set { SetValue(ArrowForegroundProperty, value);   }
        }
         
        public static readonly DependencyProperty ArrowForegroundProperty =
            DependencyProperty.Register("ArrowForeground", typeof(SolidColorBrush), typeof(WQDTabControl), 
                new PropertyMetadata(new SolidColorBrush( Color.FromRgb(159, 159, 159))));
         

        /// <summary>
        /// head水平排序
        /// </summary>
        public HorizontalAlignment HeaderHorizontalAlignment
        {
            get { return (HorizontalAlignment)GetValue(HeaderHorizontalAlignmentProperty); }
            set { SetValue(HeaderHorizontalAlignmentProperty, value); }
        }
         
        public static readonly DependencyProperty HeaderHorizontalAlignmentProperty =
            DependencyProperty.Register("HeaderHorizontalAlignment", 
                typeof(HorizontalAlignment), 
                typeof(WQDTabControl), 
                new PropertyMetadata(HorizontalAlignment.Left));


        /// <summary>
        /// 是否可以关闭TabItem
        /// </summary>
        public Visibility IsClose
        {
            get { return (Visibility)GetValue(IsCloseProperty); }
            set { SetValue(IsCloseProperty, value); }
        }
         
        public static readonly DependencyProperty IsCloseProperty =
            DependencyProperty.Register("IsClose", typeof(Visibility), typeof(WQDTabControl), new PropertyMetadata(Visibility.Visible));


    }
}
